﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BloomsburyBanHang.DTO
{
    public class TacGiaDTO
    {
        private int maTacGia;

        public int MaTacGia
        {
            get { return maTacGia; }
            set { maTacGia = value; }
        }
        private string tenTacGia;

        public string TenTacGia
        {
            get { return tenTacGia; }
            set { tenTacGia = value; }
        }
        private string hinhAnh;

        public string HinhAnh
        {
            get { return hinhAnh; }
            set { hinhAnh = value; }
        }
        private string gioiThieu;

        public string GioiThieu
        {
            get { return gioiThieu; }
            set { gioiThieu = value; }
        }
        public static TacGiaDTO Convert(TAC_GIA tg)
        {
            TacGiaDTO tacgia = new TacGiaDTO();
            tacgia.MaTacGia = tg.MaTacGia;
            tacgia.TenTacGia = tg.TenTacGia;
            tacgia.HinhAnh = tg.HinhAnh;
            tacgia.GioiThieu = tg.GioiThieu;
            return tacgia;
        }
        public static List<TacGiaDTO> ListConvert(List<TAC_GIA> lst)
        {
            List<TacGiaDTO> result = new List<TacGiaDTO>();
            for (int i = 0; i < lst.Count; i++)
            {
                result.Add(Convert(lst[i]));
            }
            return result;
        }
    }
}